/**
 * Handle changed data.
 *
 * @param {String} oldValue old value
 * @param {String} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"2677DF71-3696-4667-AB6E-210FE1BB59E0"}
 */
function onDataChangeMedioTras(oldValue, newValue, event) {
	
	var $rel = reservatrf_to_tarifari_mediotr
	var $idavuelta = new Array()
	var $reales = new Array()

	for (var i = 1 ; i <= $rel.getSize() ; i++)
	{
		var $reg = $rel.getRecord(i)
		
		if ($reales.indexOf($reg.tari_idavuel,0) == -1)
		{
			var $valor = application.getValueListDisplayValue('tipo_trf',$reg.tari_idavuel)
			$idavuelta.push($valor)
			$reales.push($reg.tari_idavuel)
		}
	}
	application.setValueListItems('reserva_trf_idavuel',$idavuelta,$reales)
	return true
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"87833408-4371-4C13-91B7-7B19EB93C00E"}
 */
function IrAAereoLlegada(event) {
	var $win = application.createWindow('WIN_AEREOS',JSWindow.MODAL_DIALOG)
	$win.title = 'Detalle de Vuelos'
	forms.carga_reserva_trf_dtl.controller.loadRecords(rf_reserva_transfer_id)
	forms.carga_reserva_trf_dtl.controller.show($win)
}
